using System;
using System.Diagnostics.Contracts;

namespace Boggle.Net.Model
{
    [ContractClass(typeof(CodeContractForIWordList))]
    public interface IWordList
    {
        bool ContainsWord(string word);
        bool ContainsWordStartingWith(string prefix);
    }

    [ContractClassFor(typeof(IWordList))]
    internal abstract class CodeContractForIWordList : IWordList
    {
        public bool ContainsWordStartingWith(string prefix)
        {
            Contract.Requires<ArgumentNullException>(prefix != null);
            return default(bool);
        }
    
        public bool ContainsWord(string word)
        {
            Contract.Requires<ArgumentNullException>(word != null);
            return default(bool);
        }
    }
}